for i in range(1,101):
    a=i%10
    b=i//10
    if i%7==0 or a==7 or b==7:
        pass
    else:
        print(i)
